<?php
class CommentController extends Zend_Controller_Action
{
	public function init() {
		$title ="Add object";
		$this->view->__set("headtitle", $title);
	    
	  }
 
    public function indexAction()
    {
    	$this->view->form = $form = new Application_Form_Product('product');
    	
    	if($this->_request->isPost()){
    		$formData = $this->getRequest()->getPost();
    		if($form->isValid($formData))
    		{
    			$product = new Application_Model_Product($form->getValues());
    			$mapper  = new Application_Model_ProductMapper();
    			$mapper->save($product);
    			
    		
    		}
    	}
        
    }
}